@extends('app.layouts.page')
@section('page-body')
    <div class="Page-body">
        <form action="{{ route('contact_us.store') }}" method="post" class="form-horizontal ContactForm">
            {{ csrf_field() }}
            @if($errors->count() > 0)
                <div class="alert alert-danger">提交数据碰到问题 !</div>
            @endif
            @if(session('success'))
                <div class="alert alert-success">{{ session('success')  }}</div>
            @endif
            <div class="form-group {{ $errors->has('name') ? 'has-error' : ''  }}">
                <label for="" class="col-xs-2 control-label">姓名</label>
                <div class="col-xs-10">
                    <input type="text" name="name" class="form-control" value="{{ old('name') }}">
                    @if($errors->has('name'))
                        <p class="has-error">{{ $errors->first('name') }}</p>
                    @endif
                </div>
            </div>
            <div class="form-group  {{ $errors->has('email') ? 'has-error' : ''  }}">
                <label for="" class="col-xs-2 control-label">邮箱</label>
                <div class="col-xs-10">
                    <input type="text" name="email" value="{{ old('email') }}" class="form-control">
                    @if($errors->has('email'))
                        <p class="has-error">{{ $errors->first('email') }}</p>
                    @endif
                </div>
            </div>
            <div class="form-group {{ $errors->has('qq') ? 'has-error' : '' }}">
                <label for="" class="col-xs-2 control-label">QQ</label>
                <div class="col-xs-10">
                    <input type="text" name="qq" value="{{ old('qq') }}" class="form-control">
                    @if($errors->has('qq'))
                        <p class="has-error">{{ $errors->first('qq') }}</p>
                    @endif
                </div>
            </div>
            <div class="form-group  {{ $errors->has('content') ? 'has-error' : ''  }}">
                <label for="" class="col-xs-2 control-label">留言内容</label>
                <div class="col-xs-10">
                    <textarea name="content" class="form-control">{{ old('content') }}</textarea>
                    @if($errors->has('content'))
                        <p class="has-error">{{ $errors->first('content') }}</p>
                    @endif
                </div>
            </div>
            <div class="form-group">
                <button type="submit" class="btn btn-primary col-xs-offset-2">提交</button>
            </div>
        </form>
    </div>
@stop